home *** CD-ROM | disk | FTP | other *** search
/ Motor Sport Digital Archive Collection 1960s / Motor Sport Digital Archive Collection 1960s.iso / main.swf / scripts / mx / effects / TweenEffect.as < prev    next >
Encoding:
Text File  |  2008-05-21  |  1.2 KB  |  39 lines

  1. package mx.effects
  2. {
  3.    import flash.events.EventDispatcher;
  4.    import mx.core.mx_internal;
  5.    import mx.effects.effectClasses.TweenEffectInstance;
  6.    import mx.events.TweenEvent;
  7.    
  8.    use namespace mx_internal;
  9.    
  10.    public class TweenEffect extends Effect
  11.    {
  12.       mx_internal static const VERSION:String = "2.0.1.0";
  13.       
  14.       public var easingFunction:Function = null;
  15.       
  16.       public function TweenEffect(param1:Object = null)
  17.       {
  18.          easingFunction = null;
  19.          super(param1);
  20.          instanceClass = TweenEffectInstance;
  21.       }
  22.       
  23.       override protected function initInstance(param1:IEffectInstance) : void
  24.       {
  25.          super.initInstance(param1);
  26.          TweenEffectInstance(param1).easingFunction = easingFunction;
  27.          EventDispatcher(param1).addEventListener(TweenEvent.TWEEN_START,tweenEventHandler);
  28.          EventDispatcher(param1).addEventListener(TweenEvent.TWEEN_UPDATE,tweenEventHandler);
  29.          EventDispatcher(param1).addEventListener(TweenEvent.TWEEN_END,tweenEventHandler);
  30.       }
  31.       
  32.       protected function tweenEventHandler(param1:TweenEvent) : void
  33.       {
  34.          dispatchEvent(param1);
  35.       }
  36.    }
  37. }
  38.  
  39.